package com.kuangshen.scanner;

import java.util.Scanner;
public class Demo2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("使用nextLine监测输入:");
        if(scanner.hasNextLine()){
            String str = scanner.nextLine();
            System.out.println("您输入的内容为:"+str);
        }
        scanner.close();
    }
}
